package dto

// CreateSequenceRuleRequest 创建编号规则请求
type CreateSequenceRuleRequest struct {
	Code        string `json:"code" binding:"required" example:"ORDER"`
	Name        string `json:"name" binding:"required" example:"订单编号"`
	Prefix      string `json:"prefix" binding:"required" example:"ORD"`
	DateFormat  string `json:"date_format" example:"YYYYMMDD"`
	SequenceLen int    `json:"sequence_len" example:"6"`
	ResetType   string `json:"reset_type" example:"daily"`
	Description string `json:"description" example:"订单编号规则"`
}

// UpdateSequenceRuleRequest 更新编号规则请求
type UpdateSequenceRuleRequest struct {
	Name        string `json:"name" example:"订单编号"`
	Prefix      string `json:"prefix" example:"ORD"`
	DateFormat  string `json:"date_format" example:"YYYYMMDD"`
	SequenceLen int    `json:"sequence_len" example:"6"`
	ResetType   string `json:"reset_type" example:"daily"`
	Status      string `json:"status" example:"active"`
	Description string `json:"description" example:"订单编号规则"`
}

// GenerateSequenceRequest 生成编号请求
type GenerateSequenceRequest struct {
	Code string `json:"code" binding:"required" example:"ORDER"`
}

// SequenceRuleResponse 编号规则响应
type SequenceRuleResponse struct {
	ID          uint   `json:"id"`
	Code        string `json:"code"`
	Name        string `json:"name"`
	Prefix      string `json:"prefix"`
	DateFormat  string `json:"date_format"`
	SequenceLen int    `json:"sequence_len"`
	ResetType   string `json:"reset_type"`
	CurrentSeq  int    `json:"current_seq"`
	Status      string `json:"status"`
	Description string `json:"description"`
}

// GenerateSequenceResponse 生成编号响应
type GenerateSequenceResponse struct {
	Code      string `json:"code"`
	Sequence  string `json:"sequence"`
	NextSeq   int    `json:"next_seq"`
}

